 |
 |
 |
 |
#232713 - 01/11/03 01:38 PM
Re: Integrated Jpilot chat
[Re: Gorlum]
|
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
|
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#232721 - 01/16/03 02:54 AM
Re: Integrated Jpilot chat
[Re: adrienne48]
|
Junior Member
Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
|
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#232731 - 01/19/03 05:56 PM
Re: Integrated Jpilot chat
[Re: Billyo]
|
Member
Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
|
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#232735 - 01/24/03 09:39 AM
Re: Integrated Jpilot chat
[Re: Daine]
|
Power User
Registered: 09/05/00
Posts: 61
Loc: Vancouver, British Columbia, C...
|
[]The little popup will update the Who's online information every 9 minutes...[/]<br /><br />Josh, I was trying to go for this, but couldn't get it. If you can spare the time, could you review this with me?<br /><br />I added this code to my jchat.tmpl:<br /><br /> [:"red"] <script language="javascript" type="text/javascript"> window.open<br />('http://www.mysite.com/threads/chatpopup.php?<br />Cat=&Username=$Username&Usernumber=$Usernumber',<br />'chatpopup','width=300,height=250,top=100,left=150,screenX=1,screenY=1,<br />scrollbars=yes,resizable=yes');</script>[/]<br /><br />...and just put this in my new "chatpopup.php":<br /> <br />[:"red"] <script language="javascript" type="text/javascript"> window.blur();</script><br /><meta http-equiv="refresh" content="500"><br /><div align="center"><b><font size="2">Please leave this window open while you <br /> are in the Chat Room.</font></b></div>[/]<br /><br />I also added the language <br />[:"red"]$ubbt_lang['jchat'] = "In Chat Room"; [/]<br />to online.php.<br /><br />The popup opens and refreshes but Who's Online doesn't update my status every 9 minutes. <br /><br />Thanks in advance for your tips!
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#232738 - 01/25/03 02:48 AM
Re: Integrated Jpilot chat
[Re: jacksonm99]
|
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
|
Yeah, in whatever script you call this: <br /> <br /> <br />('http://www.mysite.com/threads/chatpopup.php? <br />Cat=&Username=$Username&Usernumber=$Usernumber', <br />'chatpopup','width=300,height=250,top=100,left=150,screenX=1,screenY=1, <br />scrollbars=yes,resizable=yes');</script> <br /> <br /> <br />Make sure $Username & $Usernumber has been defined before it. You may need to do <br /> <br />$Username = $user['U_Username']; <br />$Usernumber = $user['U_Number']; <br /> <br />or something similar to set that up. <br /> <br />Try adding : <br /> <br />echo "Name = $Username <br />"; <br />echo "Number = $Usernumber <br />"; <br /> <br />near the top of chat popup to debug it.... see if it has a name and number... if not, that's the problem. <img src="/forum/images/graemlins/wink.gif" alt="" /> <br />
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#232739 - 01/25/03 11:24 AM
Re: Integrated Jpilot chat
[Re: Daine]
|
Power User
Registered: 09/05/00
Posts: 61
Loc: Vancouver, British Columbia, C...
|
I don't have a clue what I'm doing but I got it to work! Don't you love it when that happens?<br /><br />Here's what I did. I borrowed some code from the top of the faq_english.php file, since the "Who's Online" updates when users go to THAT file......<br /><br />So, my new "chatpopup.php" looks like this:<br /> [:"blue"] <br /><?<br />// Require the library<br /> require ("./main.inc.php");<br /><br /> $html = new html;<br /> $html -> send_header("Updater",$Cat,0,0,0,0,"");<br /><br /><br />echo "<br /><script language=\"javascript\" type=\"text/javascript\"><br /> window.blur();</script><br /><meta http-equiv=\"refresh\" content=\"550\"><br /><br /><div align=\"center\"><b><font face=\"ariel\" size=\"2\"><br />Please leave this window open while you<br /> are in the Chat Room.</b><br /> </font></b></div>";<br />?><br />[/]<br /><br />My "jchat.tpl" inludes this line, to call-up the "chatpopup.php": [:"blue"] <br /><script language="javascript" type="text/javascript"> window.open('http://www.mysite.com/threads/chatpopup.php?Cat=&Username=$Username&Usernumber=$Usernumber',<br />'chatpopup','width=800,height=300,top=000,left=000,<br />screenX=1,screenY=1,scrollbars=yes,resizable=yes');<br /></script><br />[/] <br /><br /><br /><br />The one snaglette is my chatpopup.php brings up my header, which is an unecessary bandwidth-user, especially given that it refreshes every (nearly) 10 minutes. And of course it also makes the chatpopup window unecessarily wide. So I'd love to find a way around THAT.
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#232748 - 01/26/03 07:44 PM
Re: Integrated Jpilot chat
[Re: Daine]
|
Power User
Registered: 09/05/00
Posts: 61
Loc: Vancouver, British Columbia, C...
|
Hi Josh.<br /><br />Thanks for your efforts but no that didn't work.<br /><br />Let me just review a bit:<br />My chatpopup does (as I had it) do the job -- it does keep my Who's Online up-to-date with those who are in the Chat Room, as planned.<br /><br />The only problem is that it causes my regular Threads header.tmpl to appear in the chatpopup, which looks dumb and causes confusion to users.<br /><br />If I could just find a way to not have the header.tmpl appear, I'd be laughing.<br /><br />This line in my chatpopup seems to be needed and seems to work except for the header thang: $html -> send_header("Updater",$Cat,0,0,0,0,"");. Note that I'm clueless and have no clue what I'm doing.<br /><br />P.S., My "register_globals" are "on"
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#232749 - 01/26/03 08:06 PM
Re: Integrated Jpilot chat
[Re: icewind]
|
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
|
This is what my chat popup looks like: <br /> <br /> // Require the library <br /> require ("/home/measurection/htdocs/forums/main.inc.php"); <br /> <br /> $currtime = time (); <br /> $currtime = $currtime+($config['adjusttime']*3600); <br /> $What = "chat"; <br /> <br /> $Username_q = addslashes($Username); <br /> $What_q = addslashes($What); <br /> $Usernumber_q = addslashes($Usernumber); <br /> $aux = ""; <br /> $readperm = ""; <br /> $query = " <br /> REPLACE INTO {$config['tbprefix']}Online <br /> (O_Username,O_Uid,O_Last,O_What,O_Extra,O_Read,O_Type) <br /> VALUES ('$Username_q','$Usernumber_q','$currtime','$What_q','$aux','$readperm','r') <br /> "; <br /> $dbh -> do_query($query); <br /> <br />// ------ debuggin info <br />// echo "name - $Username_q and number = $Usernumber_q"; <br /> <br />echo " <br /> <script language=\"javascript\" type=\"text/javascript\"> window.blur();</script> <br /><meta http-equiv=\"refresh\" content=\"500\"> <br /><font size =\"+1\"><div align=\"center\"> <br /><b>Please leave this window open while you are in the Chat Room. <br /></b></font></div> <br />"; <br /> <br />?>
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#232813 - 05/18/03 07:26 PM
Re: [6.2] Integrated Jpilot chat
[Re: edr]
|
Member
Registered: 01/03/01
Posts: 60
Loc: Charlottesville, VA
|
Thought I would post this: I modified my jchat.php to change special characters in usernames.. I might not have gotten them, all, but did get the common ones my users have..<br /><br />paste this into jchat.php<br /><br /> <br />//Replace certain characters<br /> $irc_nick = str_replace('©', '(c)', $Username);<br /> $irc_nick = str_replace('@', '(a)', $Username);<br /> $irc_nick = str_replace('®', '(r)', $Username);<br /> $irc_nick = str_replace('™', '(TM)', $Username);<br />
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#232820 - 05/19/03 01:10 AM
Re: [6.2] Integrated Jpilot chat
[Re: mario_dup1]
|
Junior Member
Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
|
There is one problem with the way you wrote it: The value of $irc_nick will be the last line ( $irc_nick = str_replace('™', '(TM)', $Username); ), all the others will be over written. Try changing it to this: <br /> <br /> <br />$irc_nick = str_replace('©', '(c)', $irc_nick); <br />$irc_nick = str_replace('@', '(a)', $irc_nick); <br />$irc_nick = str_replace('®', '(r)', $irc_nick); <br />$irc_nick = str_replace('™', '(TM)', $irc_nick); <br /> <br /> <br />That should work <img src="/forum/images/graemlins/wink.gif" alt="" /> <br /> <br />Edit: Remember to keep the first string replace line! <br /> <br />$irc_nick = str_replace(' ', '_', $Username); <br /> <br />
Edited by Dalantech (05/19/03 01:14 AM)
|
|
Top
|
|
|
|
 |
 |
 |
 |
|
|